/**
 * @author mirzatsoft@163.com
 */

import request from '../libs/http'

export function getBoards()
{
  return request({
    url :'/board',
    method:'get'
  });
}


export function getBoard(boardId)
{
  return request({
    url: '/board/' + boardId,
    method: 'get'
  });
}


export function createBoard(title)
{
  return request({
    url:'/board',
    method:'post',
    data: {
      title: title
    }
  });
}


export function updateBoard(boardId, data)
{
  return request({
    url: '/board/' + boardId,
    method:'put',
    data: data
  });
}

export function deleteBoard(boardId)
{
  return request({
    url: '/board/' + boardId,
    method: 'delete'
  });
}
